#include <stdio.h>
#include <stdlib.h>
extern int yylex();
extern int yyrestart(FILE*);
extern FILE *yyin;

int main(int argc, char **argv)
{
	int i;

	if (argc < 2) { /* just read stdin */
		yylex();
		return 0;
	}

	for(i = 1; i < argc; i++) {
		FILE *f = fopen(argv[i], "r");

		if(!f) {
			perror(argv[i]);
			return 1;
		}
		yyrestart(f);
		yylex();
		fclose(f);
	}

	return 0;
}
